package com.jctrip.hotel.management.model.result;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: zxy
 * @CreateTime: 2023-09-23 16:06
 * @Description:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GetXieChengPricePolicyResult implements Serializable {

    @ApiModelProperty("价格政策列表")
    private List<ManagePricePolicy> pricePolicyList;

    private Long pages;

    private Long total;

    private Long current;

    private Long size;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ManagePricePolicy implements Serializable{
        @ApiModelProperty("价格政策id")
        private String pricePolicyId;

        @ApiModelProperty("渠道编码")
        private String sourceCode;

        @ApiModelProperty("价格政策名称")
        private String pricePolicyName;

        @ApiModelProperty("价格政策编码")
        private String pricePolicyCode;

        @ApiModelProperty("渠道id")
        private String routeId;

        @ApiModelProperty("支付类型")
        private Integer paymentType;

        @ApiModelProperty("价格模式")
        private Integer priceType;

        @ApiModelProperty("取哪个价格")
        private Integer priceGuide;

        @ApiModelProperty("售卖库存类型")
        private Integer stockType;

        @ApiModelProperty("早餐数")
        private Integer breakfastCount;

        @ApiModelProperty("取消规则")
        private cancelRuleInfo cancelRule;

        @ApiModelProperty("价格政策区间")
        private List<pricePolicyRangeInfo> policyRangeInfoList;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class cancelRuleInfo {
        @ApiModelProperty("取消类型,携程选填,0不变 1 不可取消 2 可取消")
        private Integer cancelType;

        @ApiModelProperty("最晚取消时间天,携程选填且取消类型为2时必填")
        private Integer latestCancelTimeOfDays;

        @ApiModelProperty("最晚取消时间小时,携程选填且取消类型为2时必填；（范围1~23")
        private Integer latestCancelTimeOfHours;

        @ApiModelProperty("逾期扣款类型,携程选填F：扣首日 C:扣全款，默认为C且取消类型为2时必填")
        private String overduePaymentType;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class pricePolicyRangeInfo implements Serializable{
        @ApiModelProperty("价格区间最小值")
        private BigDecimal rangePriceMin;

        @ApiModelProperty("价格区间最大值")
        private BigDecimal rangePriceMax;

        @ApiModelProperty("加价率")
        private BigDecimal markupRate;

        @ApiModelProperty("固定加价金额")
        private BigDecimal markupFixed;
    }

}